import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/vueHome.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'vueMain',
        component: () => import('../views/vueMain.vue'),
        // redirect: '/login',
        children: [
            {
                path: '/vuehome',
                name: 'vueHome',
                component: () => import('../views/vueHome')
            },
            {
                path: '/vuemall',
                name: 'vueMall',
                component: () => import('../views/vueMall')
            },
            {
                path: '/vueuser',
                name: 'vueUser',
                component: () => import('../views/vueUser')
            },
            {
                path: '/page1',
                name: 'page1',
                component: () => import('../views/other/pageOne.vue')
            },
            {
                path: '/page2',
                name: 'page2',
                component: () => import('../views/other/pageTwo.vue')
            },
        ]
    },
    {
        path:'/login',
        name:'login',
        component: () => import('../views/login/vueLogin.vue')
    }

]

const router = new VueRouter({
    mode: 'hash',
    routes
})

export default router